home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / drivers / sio126.arj / SIOREF.TXT < prev    next >
Text File  |  1994-01-08  |  75KB  |  1,926 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                                           SIO
  27.                               Technical Reference Manual
  28.  
  29.  
  30.  
  31.                         Copyright (c) 1993 by Raymond L. Gwinn
  32.                                  12469 Cavalier Drive
  33.                               Woodbridge, Virginia 22192
  34.                                  All Rights Reserved
  35.  
  36.                                    January 7, 1994
  37.  
  38.  
  39.                                 CompuServe: 71154,575
  40.                              InterNet: p00321@psilink.com
  41.                                 Voice: 1-703-494-4673
  42.                                  FAX: 1-703-494-0595
  43.                                  BBS: 1-703-494-0098
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                      INTRODUCTION
  69.  
  70.           Documentation of software is often more difficult than writing
  71.           the program itself (at least it is for this author).  I will do
  72.           my best though.
  73.  
  74.           But who do I document for?  The user that is setting up a BBS
  75.           just wants to get SIO installed and to move on to more important
  76.           things.  The user that is having problems needs information about
  77.           serial I/O communications in general and the PC specifically. 
  78.           The application developer (programmer) needs detailed information
  79.           about each individual function and the information generated.
  80.  
  81.           The answer is, more than one manual is needed.  This manual is
  82.           intended as a reference for use by application programmers that
  83.           desires to use SIO.  A separate Users Manual is included in the
  84.           distribution file(s).
  85.  
  86.           This manual and the software described is provided as is and with
  87.           no guarantees.  Use at your own risk.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.           ii
  96.  
  97.  
  98.           WHAT IS SIO . . . . . . . . . . . . . . . . . . . . . . . . .   1
  99.  
  100.           DISTRIBUTION, ORDERING AND SUPPORT  . . . . . . . . . . . . .   2
  101.                Distribution and Ordering  . . . . . . . . . . . . . . .   2
  102.                     SIO Distribution and Support BBS  . . . . . . . . .   2
  103.                Support  . . . . . . . . . . . . . . . . . . . . . . . .   2
  104.                     OS/2 Vendor Forum on CompuServe . . . . . . . . . .   2
  105.  
  106.           File System Requests  . . . . . . . . . . . . . . . . . . . .   3
  107.                Driver Initialization  . . . . . . . . . . . . . . . . .   3
  108.                Read . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  109.                Input Status . . . . . . . . . . . . . . . . . . . . . .   3
  110.                Input Flush  . . . . . . . . . . . . . . . . . . . . . .   4
  111.                Write  . . . . . . . . . . . . . . . . . . . . . . . . .   4
  112.                Output Status  . . . . . . . . . . . . . . . . . . . . .   4
  113.                Output Flush . . . . . . . . . . . . . . . . . . . . . .   4
  114.                Open . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  115.                     Initial Open  . . . . . . . . . . . . . . . . . . .   5
  116.                     Additional Open . . . . . . . . . . . . . . . . . .   5
  117.                Close  . . . . . . . . . . . . . . . . . . . . . . . . .   5
  118.                     Intermediate Close  . . . . . . . . . . . . . . . .   6
  119.                     Last Close  . . . . . . . . . . . . . . . . . . . .   6
  120.  
  121.           Device I/O Control (IOCtl) Commands . . . . . . . . . . . . .   7
  122.                41h - Set Bit Rate . . . . . . . . . . . . . . . . . . .   8
  123.                42h - Set Line Characteristics . . . . . . . . . . . . .   9
  124.                43h - Extended Set Bit Rate  . . . . . . . . . . . . .    10
  125.                44h - Transmit Byte Immediate  . . . . . . . . . . . .    11
  126.                45h - Set Break Off  . . . . . . . . . . . . . . . . .    11
  127.                46h - Set Modem Control Signals  . . . . . . . . . . .    12
  128.                47h - Hold Transmit  . . . . . . . . . . . . . . . . .    13
  129.                48h - Start Transmit . . . . . . . . . . . . . . . . .    13
  130.                4Bh - Set Break on . . . . . . . . . . . . . . . . . .    14
  131.                53h - Write Device Control Block (DCB)   . . . . . . .    14
  132.                54h - Write Extended Mode Parameters . . . . . . . . .    17
  133.                61h - Query Current Bit Rate . . . . . . . . . . . . .    18
  134.                62h - Query Line Characteristics . . . . . . . . . . .    18
  135.                63h - Query Extended Bit Rate  . . . . . . . . . . . .    19
  136.                64h - Query SIO Status . . . . . . . . . . . . . . . .    20
  137.                65h - Query Transmit Data Status . . . . . . . . . . .    21
  138.                66h - Query Current Modem Output Control Signals . . .    22
  139.                67h - Query Current Modem Input Signals  . . . . . . .    22
  140.                68h - Query Number of Characters in Receive Buffer . .    23
  141.                6Dh - Query SIO Error  . . . . . . . . . . . . . . . .    24
  142.                72h - Query SIO Event Information  . . . . . . . . . .    25
  143.                73h - Read Device Control Block (DCB)  . . . . . . . .    26
  144.                74h - Read Enhanced Mode Parameters  . . . . . . . . .    26
  145.  
  146.           Differences between SIO/VSIO and COM/VCOM . . . . . . . . .    27
  147.  
  148.           Appendix A, Hardware Port and IRQ Assignments . . . . . . .    28
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.                                                                         iii
  157.  
  158.                Addresses and IRQs for COM1 and COM2 . . . . . . . . .    28
  159.                Defacto standard for COM3 and COM4 . . . . . . . . . .    28
  160.                Addresses and IRQ for COM3 through COM8 on the PS/2  .    28
  161.  
  162.           Appendix B, SIO Chips . . . . . . . . . . . . . . . . . . .    29
  163.                8250 . . . . . . . . . . . . . . . . . . . . . . . . .    29
  164.                8250A  . . . . . . . . . . . . . . . . . . . . . . . .    29
  165.                16450  . . . . . . . . . . . . . . . . . . . . . . . .    30
  166.                16C451 . . . . . . . . . . . . . . . . . . . . . . . .    30
  167.                16550 (Non A . . . . . . . . . . . . . . . . . . . . .    30
  168.                16550A . . . . . . . . . . . . . . . . . . . . . . . .    30
  169.                16550AF  . . . . . . . . . . . . . . . . . . . . . . .    30
  170.                16550AFN . . . . . . . . . . . . . . . . . . . . . . .    30
  171.                16550s Made by Western Digital . . . . . . . . . . . .    31
  172.                16C551 . . . . . . . . . . . . . . . . . . . . . . . .    31
  173.                16C552 . . . . . . . . . . . . . . . . . . . . . . . .    31
  174.                16C554 . . . . . . . . . . . . . . . . . . . . . . . .    31
  175.                82510  . . . . . . . . . . . . . . . . . . . . . . . .    31
  176.  
  177.           Appendix C, Multi-Port Serial I/0 Cards . . . . . . . . . .    32
  178.                STB 4COM . . . . . . . . . . . . . . . . . . . . . . .    32
  179.  
  180.           Appendix D, Advanced SIO Options  . . . . . . . . . . . . .    33
  181.                Protection . . . . . . . . . . . . . . . . . . . . . .    33
  182.                Locked Baud Rate . . . . . . . . . . . . . . . . . . .    33
  183.                IRQ Reflection to DOS Process  . . . . . . . . . . . .    33
  184.                I/O Port Mapping to DOS Process  . . . . . . . . . . .    33
  185.  
  186.           Index . . . . . . . . . . . . . . . . . . . . . . . . . . .    34
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                                                           1
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.                                      WHAT IS SIO
  212.  
  213.           SIO is a Serial Input/Output (SIO) communications character
  214.           device driver.  It provides an interface between application
  215.           programs and the serial communications hardware.
  216.  
  217.           SIO had been designed as a high performance replacement for the
  218.           OS/2 device driver COM.SYS.  This manual documents the known
  219.           differences between COM.SYS and SIO.SYS.
  220.  
  221.           SIO only works with 8250 (type) serial I/O devices.  Such devices
  222.           include, but is not limited to the 8250A, 16450, 16550, 16550A
  223.           and the 82510.  If you have a PC that is an IBM or near
  224.           compatible which has a serial communication port, it is likely
  225.           that it contains one of these devices.  SIO will identify the
  226.           type of serial devices that it finds at load time.
  227.  
  228.           Like other Device Drivers, SIO will do very little standing
  229.           alone.  There must be an application(s) program that makes use of
  230.           SIO's functions before one will benefit from the use of SIO.
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.           2
  239.  
  240.                           DISTRIBUTION, ORDERING AND SUPPORT
  241.  
  242.           Distribution and Ordering
  243.  
  244.           The entire package collectively known as SIO is ShareWare.  It is
  245.           not free software or freeware.  See LICENSE.TXT and ORDER.TXT for
  246.           additional information.  The ShareWare version of SIO is
  247.           distributed electronically.  One may check their favorite
  248.           electronic hangout for the latest version of SIO.  The latest
  249.           copy of the ShareWare version is always posted for downloading
  250.           from the BBS at 1-703-494-0098.
  251.  
  252.           Registered versions of SIO are distributed by US Mail and
  253.           electronically from the SIO Distribution and Support BBS.  Users
  254.           desiring to register electronically, may call the BBS and
  255.           register on line (1-703-494-0098) and immediately download their
  256.           registered version of SIO.  Use the ORDER command at the main BBS
  257.           prompt.
  258.  
  259.           Registrations/Orders can also be placed by phone, mail, FAX, and
  260.           email.  See the front cover of this manual for the phone numbers
  261.           and addresses.  Also see ORDER.TXT for and order form that may be
  262.           used.
  263.  
  264.           Support
  265.  
  266.           Extensive testing has been done to insure that this product works
  267.           on the widest possible range of OS/2 V2 (and up) systems.  In
  268.           most cases, problems can be resolved by reading this manual
  269.           carefully.
  270.  
  271.           Registered users of SIO can update to the latest version using
  272.           the BBS and its UPDATE command.  All variations (number of ports)
  273.           of SIO are available for immediate download from the BBS.
  274.  
  275.           Support is provided in section 1 (Other Vendors) of the OS/2
  276.           Vendor Forum on CompuServe (GO OS2AVEN).  Regular checks are made
  277.           in this Forum for SIO support questions.
  278.  
  279.           In addition, support is provided by BBS, Email and FAX.  Voice
  280.           support would overwhelm the author.  If, after reading the manual
  281.           carefully, you are unable to resolve a problem, you may fill out
  282.           PROBLEM.TXT (adding information as necessary) and Email/FAX it to
  283.           one of the following:
  284.  
  285.                                         Email
  286.                                  CompuServe 71154,575
  287.                              Internet p00321@psilink.com
  288.                                   FAX 1-703-494-0595
  289.                                   BBS 1-703-494-0098
  290.  
  291.           PROBLEM.TXT is included in the distribution ZIP.
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.                                                                           3
  300.  
  301.                                  File System Requests
  302.  
  303.           SIO processes all file system requests made to it in one way or
  304.           another.  The following file system requests and how SIO
  305.           processes them may be of use to the application programmer.
  306.  
  307.           INIT           Driver initialization.
  308.           Read           Data transfer from driver to program.
  309.           Input Status   Get input status.
  310.           Input Flush    Terminate all pending input requests.
  311.           Write          Data transfer from program to driver.
  312.           Output Status  Get output status.
  313.           Output Flush   Terminate all pending output requests.
  314.           Open           Open the device for use.
  315.           Close          Close the device.
  316.           IOCTL          Device I/O control commands.
  317.  
  318.           Each of these file system requests are discussed in more detail
  319.           in the following.
  320.  
  321.                                 Driver Initialization
  322.  
  323.           During device driver initialization the command line is parsed,
  324.           memory for data and control buffers are allocated and the system
  325.           environment is examined.
  326.  
  327.           Buffers are allocated for the maximum number of ports that the
  328.           installed version of SIO can support (up to 16).
  329.  
  330.           The mouse port is determined and if it is a serial mouse, that
  331.           port is excluded from use by SIO.
  332.  
  333.           In the absents of any command line parameters, SIO will only
  334.           support (look for) COM1 and COM2 at the standard addresses.  COM3
  335.           and up will not be supported (or looked at) unless they are
  336.           specifically identified in the SIO command line.
  337.  
  338.                                          Read
  339.  
  340.           If another read is already in progress, the process issuing the
  341.           additional read is blocked (suspended) until the previous read
  342.           command completes.  When a read is started, that read is not
  343.           interrupted by additional reads.  If multiple reads are issued,
  344.           they are not necessarily processed in the order they were issued. 
  345.           Thus, applications may not see the read requests complete in the
  346.           order in which they were issued.
  347.  
  348.           The conditions that control when the read will complete are
  349.           controlled by the active (current) DCB when the read is started.
  350.  
  351.                                      Input Status
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.           4
  360.  
  361.           This function returns with "device busy" set if there is no data
  362.           in the receive buffer.  That is, busy is returned if the process
  363.           may be blocked if the application issues a read command.
  364.  
  365.                                      Input Flush
  366.  
  367.           This function causes the receive buffer to be cleared (made
  368.           empty).  Any threads that are blocked, waiting for a read, will
  369.           be restarted when this function is issued.
  370.  
  371.  
  372.                                         Write
  373.  
  374.           If another write is already in progress, the process issuing the
  375.           additional write is blocked (suspended) until the previous write
  376.           command completes.  When a write is started, that write is not
  377.           interrupted by additional writes.  If multiple writes are issued,
  378.           they are not necessarily processed in the order they were issued. 
  379.           Thus, applications may not see the write requests complete in the
  380.           order in which they were issued.
  381.  
  382.           The conditions that control when the write will complete are
  383.           controlled by the current DCB when the write is started.
  384.  
  385.  
  386.                                     Output Status
  387.  
  388.           This function returns with "device busy" set if the output buffer
  389.           is more than three quarters full.  That is, busy is returned if
  390.           the process may be blocked if the application issues a write
  391.           command.
  392.  
  393.                                      Output Flush
  394.  
  395.           This function causes the transmit buffer to be cleared (made
  396.           empty).  Any threads that are blocked, waiting for a read, will
  397.           be restarted when this function is issued.
  398.  
  399.  
  400.                                          Open
  401.  
  402.           There are basically two kinds of open.  They are, an Initial Open
  403.           and Additional (shared) Opens. The IBM documentation calls the
  404.           initial open a First Level Open.  An Initial Open is an open that
  405.           occurs when no other process has the communications port open. 
  406.           An Additional Open is when an open occurs and another process
  407.           already has the communications port open.  For an Additional Open
  408.           to occur, the Initial Opener must have issued an open allowing
  409.           shared access to the port.
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.                                                                           5
  418.  
  419.  
  420.  
  421.           Initial Open
  422.  
  423.           The IRQ associated with the comm port is claimed (taken) when the
  424.           Initial Open occurs.  If the associated IRQ is not available a
  425.           "Port in Use" error is returned.  At the time of this writing,
  426.           the IRQ is claimed allowing sharing.  However, the shared IRQ
  427.           claiming is done to circumvent anomalies in the OS, and in
  428.           actuality SIO will not concurrently share an IRQ with another
  429.           device driver.  The author found it necessary to claim (reset)
  430.           all interrupts directed to the interrupt service routine in order
  431.           to prevent lock ups of a communications port.  The IRQ mess may
  432.           be cleaned up at a future date when the OS problems are
  433.           corrected.
  434.  
  435.           During Initial Opens, DTR and RTS are set in accordance with the
  436.           current Device Control Block (DCB) settings.  If DTR Control Mode
  437.           is the "Enabled" option ( bits 1 and 0 of the DCB Flags1 byte
  438.           equal 01), then DTR is turned on.  Otherwise, DTR is unchanged by
  439.           the Initial Open.  Similarly, if RTS Control Mode is the
  440.           "Enabled" option ( bits 7 and 6 of the DCB Flags1 byte equal 01),
  441.           then RTS is turned on.  Otherwise, RTS is unchanged by the
  442.           Initial Open.
  443.  
  444.           The following actions also occur during an Initial Open:
  445.  
  446.                The Xon and Xoff characters are set to 11h and 13h
  447.                respectively.
  448.  
  449.                The transmit and receive buffers and structures are cleared
  450.                and re-initialized.
  451.  
  452.                Status bits are reset.
  453.  
  454.           If the Initial Opener is an OS/2 process (not a DOS process) then
  455.           the Read time out processing is set to "Normal" in the current
  456.           DCB.
  457.  
  458.           Additional Open
  459.  
  460.           A count of active opens is incremented.  No changes are made to
  461.           current comm settings.
  462.  
  463.  
  464.                                         Close
  465.  
  466.           There are two basic kinds of closes.  They are, an Intermediate
  467.           Close and a Last Close.
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.           6
  476.  
  477.           Intermediate Close
  478.  
  479.           An intermediate close occurs when a process issues a close and
  480.           other processes still have the communications port opened.  This
  481.           type of close simply decrements an open count and returns.  No
  482.           action or changes take place at the communications port.
  483.  
  484.           Last Close
  485.  
  486.           The last close occurs when a process issues a close and no other
  487.           process has the communications port open.  If there are any
  488.           writes pending or incomplete, the process is blocked (suspended)
  489.           until the writes complete or time out.  If 60 seconds pass with
  490.           no activity at the communications port, the port is forced to
  491.           close and all writes are terminated.  If any processes are
  492.           blocked (suspended) waiting on a read, they are forced to return
  493.           to the process that issued the read.
  494.  
  495.           If either DTR Control Mode or RTS Control Mode are set to
  496.           "Enabled" by the current DCB, then the appropriate signal(s) is
  497.           turned off.
  498.  
  499.           Finally, the IRQ is released back to the OS.
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.                                                                           7
  508.  
  509.                          Device I/O Control (IOCtl) Commands
  510.  
  511.           The following Generic IOCtl functions are supported by SIO.
  512.                41h - Set Bit Rate
  513.                42h - Set Line Characteristics
  514.                43h - Extended Set Bit Rate
  515.                44h - Transmit Byte Immediate
  516.                45h - Set Break Off
  517.                46h - Set Modem Control Signals
  518.                47h - Hold Transmit
  519.                48h - Start Transmit (after hold)
  520.                4Bh - Set Break On
  521.                53h - Write Device Control Block (DCB) 
  522.                54h - Write Extended Mode Parameters
  523.                61h - Query Current Bit Rate
  524.                62h - Query Line Characteristics
  525.                63h - Query Extended Bit Rate
  526.                64h - Query SIO Status
  527.                65h - Query Transmit Data Status
  528.                66h - Query Current Modem Output Control Signals
  529.                67h - Query Current Modem Input Signals
  530.                68h - Query Number of Characters in Receive Buffer
  531.                69h - Query Number of Characters in Transmit Buffer
  532.                6Dh - Query SIO Error
  533.                72h - Query SIO Event Information
  534.                73h - Read Device Control Block (DCB)
  535.                74h - Read Enhanced Mode Parameters
  536.  
  537.           All IOCtl functions are called with a uniform set of parameters. 
  538.           This uniform set of parameters is:
  539.                DWORD     Address of a data packet.
  540.                WORD      Size of the data packet in bytes.
  541.                DWORD     Address of the parameter packet.
  542.                WORD      Size of the parameter packet in bytes.
  543.                WORD      Function code.
  544.                WORD      Category code (01 for SIO).
  545.                WORD      Handle for the opened device. 
  546.  
  547.           Each IOCtl function may or may not have a data or parameter
  548.           packet.  If a given IOCtl function specifies a NULL parameter or
  549.           data packet, the address of the appropriate item must be NULL
  550.           (zero) in the parameters.  Passing an invalid data or parameter
  551.           packet may result in a General Protection Fault.
  552.  
  553.           Each of these IOCtl commands are described in detail on the
  554.           following pages.
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.           8
  563.  
  564.  
  565.                                   41h - Set Bit Rate
  566.  
  567.           Parameter Packet
  568.  
  569.                ┌──────────────────────────────────────┐
  570.                │         Item                Type     │
  571.                ├───────────────────────────┬──────────┤
  572.                │ Bit/Baud Rate             │ WORD     │
  573.                └───────────────────────────┴──────────┘
  574.  
  575.                "Bit Rate" is any number from 1 to 65535.  SIO does not
  576.                attempt to validate a given bit rate.  SIO rounds the given
  577.                bit rate to the nearest multiple of 10.  For example, 75 is
  578.                rounded to 80 and 134 is rounded to 130.
  579.  
  580.                Note that the hardware may not be able to generate the given
  581.                bit rate.  For example, if a computer has a standard
  582.                communications card installed and if a bit rate of 65500 is
  583.                specified, the nearest bit rate that can be generated will
  584.                be set, 57600 in this case.
  585.  
  586.                To set bit rates in excess of 57600, see IOCtl function 43h,
  587.                Extended Set Bit Rate.
  588.  
  589.                Some commonly used bit rates that can be set with this
  590.                function are:
  591.  
  592.                110       3600
  593.                150       4800
  594.                300       7200
  595.                600       9600
  596.                1200      19200
  597.                1800      28800
  598.                2000      38400
  599.                2400      57600
  600.  
  601.  
  602.           Data Packet - None
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.                                                                           9
  611.  
  612.  
  613.                             42h - Set Line Characteristics
  614.  
  615.           Parameter Packet
  616.  
  617.                ┌──────────────────────────────────────┐
  618.                │         Item                Type     │
  619.                ├───────────────────────────┬──────────┤
  620.                │ Data Bits Per Character   │ BYTE     │
  621.                ├───────────────────────────┼──────────┤
  622.                │ Parity Setting            │ BYTE     │
  623.                ├───────────────────────────┼──────────┤
  624.                │ Stop Bit Setting          │ BYTE     │
  625.                └───────────────────────────┴──────────┘
  626.  
  627.                Data Bits Per Character may be 5, 7, or 8, all other values
  628.                are invalid.
  629.  
  630.                Parity Setting may have the following values, all other
  631.                values are invalid:
  632.                     0 - No parity bit.
  633.                     1 - Odd parity.
  634.                     2 - Even parity.
  635.                     3 - Mark parity (1).
  636.                     4 - Space parity (0).
  637.  
  638.  
  639.                Stop Bit Setting may have the following values, all other
  640.                values are invalid:
  641.                     0 - 1 stop bit.
  642.                     1 - 1.5 stop bit (valid with 5 data bit characters).
  643.                     2 - 2 stop bits.
  644.  
  645.  
  646.           Data Packet - None
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.           10
  655.  
  656.  
  657.                              43h - Extended Set Bit Rate
  658.  
  659.           Parameter Packet
  660.  
  661.                ┌──────────────────────────────────────┐
  662.                │         Item                Type     │
  663.                ├───────────────────────────┬──────────┤
  664.                │ Bit/Baud Rate             │ DWORD    │
  665.                ├───────────────────────────┼──────────┤
  666.                │ Fraction                  │ BYTE     │
  667.                └───────────────────────────┴──────────┘
  668.  
  669.  
  670.                "Bit Rate" is the desired bit/baud rate.  As of this
  671.                writing, the maximum bit rate supported by SIO is 115200. 
  672.                SIO does not attempt to validate a given bit rate.  SIO
  673.                rounds the given bit rate to the nearest multiple of 10. 
  674.                For example, 75 is rounded to 80 and 134 is rounded to 130.
  675.  
  676.                Note that the hardware may not be able to generate the given
  677.                bit rate.  For example, if a computer has a standard
  678.                communications card installed and if a bit rate of 65500 is
  679.                specified, the nearest bit rate that can be generated will
  680.                be set, 57600 in this case.
  681.  
  682.  
  683.                "Fraction" is used to set the fractional part of the bit
  684.                rate when a high degree of accuracy is needed.  As of this
  685.                writing, SIO does not support a "Fraction" other than zero.
  686.  
  687.                Some commonly used bit rates that can be set with this
  688.                function are:
  689.  
  690.                110       3600      115200
  691.                150       4800
  692.                300       7200
  693.                600       9600
  694.                1200      19200
  695.                1800      28800
  696.                2000      38400
  697.                2400      57600
  698.  
  699.           Data Packet - None
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                                                                          11
  708.  
  709.  
  710.                             44h - Transmit Byte Immediate
  711.  
  712.           Parameter Packet
  713.  
  714.                ┌──────────────────────────────────────┐
  715.                │         Item                Type     │
  716.                ├───────────────────────────┬──────────┤
  717.                │ Character to Transmit     │ BYTE     │
  718.                └───────────────────────────┴──────────┘
  719.  
  720.                "Character to Transmit" will be the next character loaded
  721.                into the UART for transmission.  If a previous transmit
  722.                immediate byte is still pending, it is lost.  This function
  723.                does not wait for the character to transmit before
  724.                returning.
  725.  
  726.                This function may be used by an application program as one
  727.                of a set of functions to implement its own Xon/Xoff type
  728.                handshaking.
  729.  
  730.           Data Packet - None
  731.  
  732.  
  733.                                  45h - Set Break Off
  734.  
  735.           Parameter Packet - None
  736.  
  737.                Look!! No Parameter Packet!
  738.  
  739.           Data Packet
  740.  
  741.                ┌──────────────────────────────────────┐
  742.                │         Item                Type     │
  743.                ├───────────────────────────┬──────────┤
  744.                │ SIO Error Word            │ WORD     │
  745.                └───────────────────────────┴──────────┘
  746.  
  747.                See function 6Dh "Query SIO Error" for a description of the
  748.                SIO Error Word.  This function does not reset any bits in
  749.                the SIO Error Word.
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.           12
  758.  
  759.  
  760.                            46h - Set Modem Control Signals
  761.  
  762.           Parameter Packet
  763.  
  764.                ┌──────────────────────────────────────┐
  765.                │         Item                Type     │
  766.                ├───────────────────────────┬──────────┤
  767.                │ DTR and RTS on mask       │ BYTE     │
  768.                ├───────────────────────────┼──────────┤
  769.                │ DTR and RTS off mask      │ BYTE     │
  770.                └───────────────────────────┴──────────┘
  771.  
  772.                Attempted changes in the the setting of signals that are
  773.                used as flow control signals are ignored.  The current DCB
  774.                determines if either or both RTS and DTR are used as a flow
  775.                control signal.
  776.  
  777.                The setting of bit 0 affects DTR and the setting of bit 1
  778.                affects RTS.  Ones in the "on mask" specifies which of the
  779.                two signals are to be turned on, and zeros in the "off mask"
  780.                specify which of the two signals are to be turned off.
  781.  
  782.                Some examples are:
  783.                     On Mask        Off Mask
  784.                     01h            0FFh      Turn DTR on
  785.                     00h            0FEh      Turn DTR off
  786.                     02h            0FFh      Turn RTS on
  787.                     00h            0FDh      Turn RTS off
  788.                     03h            0FFh      Turn RTS and DTR on
  789.                     00h            0FCh      Turn RTS and DTR off
  790.  
  791.                If both on and off are specified for the setting of a
  792.                signal, the result is undefined.
  793.  
  794.           Data Packet
  795.  
  796.                ┌──────────────────────────────────────┐
  797.                │         Item                Type     │
  798.                ├───────────────────────────┬──────────┤
  799.                │ SIO Error Word            │ WORD     │
  800.                └───────────────────────────┴──────────┘
  801.  
  802.                See function 6Dh "Query SIO Error" for a description of the
  803.                SIO Error Word.  This function does not reset any bits in
  804.                the SIO Error Word.
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.                                                                          13
  813.  
  814.  
  815.                                  47h - Hold Transmit
  816.  
  817.           Parameter Packet - None
  818.  
  819.           Data Packet - None
  820.  
  821.                This function will disable the transmitter.  The transmitter
  822.                will not be enabled again unless IOCtl function 48h is
  823.                issued.  If the transmitter is already disabled, this call
  824.                has no effect.
  825.  
  826.                This function can be used as part of a set that allows an
  827.                application to implement its own Xon/Xoff type handshaking.
  828.  
  829.                Note that this is different from how COM.SYS implements this
  830.                function.  COM.SYS will re-enable the transmitter if an Xon
  831.                is received while SIO will not.
  832.  
  833.  
  834.                                  48h - Start Transmit
  835.  
  836.           Parameter Packet - None
  837.  
  838.           Data Packet - None
  839.  
  840.                This function will enable the transmitter, usually following
  841.                an IOCtl function 47h.  If the transmitter is already
  842.                enabled, this call has no effect.
  843.  
  844.                This function can be used as part of a set that allows an
  845.                application to implement its own Xon/Xoff type handshaking.
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.           14
  854.  
  855.  
  856.                                   4Bh - Set Break on
  857.  
  858.           Parameter Packet - None
  859.  
  860.                Look!! No Parameter Packet!
  861.  
  862.           Data Packet
  863.  
  864.                ┌──────────────────────────────────────┐
  865.                │         Item                Type     │
  866.                ├───────────────────────────┬──────────┤
  867.                │ SIO Error Word            │ WORD     │
  868.                └───────────────────────────┴──────────┘
  869.  
  870.                See function 6Dh "Query SIO Error" for a description of the
  871.                SIO Error Word.  This function does not reset any bits in
  872.                the SIO Error Word.
  873.  
  874.  
  875.                        53h - Write Device Control Block (DCB) 
  876.  
  877.           This is where the action is!  See also function 73h (Read DCB).
  878.  
  879.           Parameter Packet
  880.  
  881.                ┌──────────────────────────────────────┐
  882.                │         Item                Type     │
  883.                ├───────────────────────────┬──────────┤
  884.                │ Write Timeout             │ WORD     │
  885.                ├───────────────────────────┼──────────┤
  886.                │ Read Timeout              │ WORD     │
  887.                ├───────────────────────────┼──────────┤
  888.                │ Flags1                    │ BYTE     │
  889.                ├───────────────────────────┼──────────┤
  890.                │ Flags2                    │ BYTE     │
  891.                ├───────────────────────────┼──────────┤
  892.                │ Flags3                    │ BYTE     │
  893.                ├───────────────────────────┼──────────┤
  894.                │ Error Replacement Byte    │ BYTE     │
  895.                ├───────────────────────────┼──────────┤
  896.                │ Break Replacement Byte    │ BYTE     │
  897.                ├───────────────────────────┼──────────┤
  898.                │ Xon Character             │ BYTE     │
  899.                ├───────────────────────────┼──────────┤
  900.                │ Xoff Character            │ BYTE     │
  901.                └───────────────────────────┴──────────┘
  902.  
  903.  
  904.                "Write Timeout"  The write timeout is given in hundredths of
  905.                a second, relative to zero.  That is, 0 specifies 0.01
  906.                seconds and 1 specifies 0.02 seconds.
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.                                                                          15
  915.  
  916.                "Read Timeout" The read timeout is given in hundredths of a
  917.                second, relative to zero.  That is, 0 specifies 0.01 seconds
  918.                and 1 specifies 0.02 seconds.
  919.  
  920.                "Flags1" is a bit flag.  The bits in the flag specify the
  921.                following:
  922.  
  923.                Bits 1 and 0        DTR Control Mode.
  924.                          00 - Disable changing DTR during Open and Close.
  925.                          01 - Enable Changing DTR during Open and Close.
  926.                          10 - DTR used for input handshaking (not supported
  927.                               by SIO).
  928.                          11 - Invalid
  929.  
  930.                Bit 2,    Must be zero
  931.                Bit 3,    Off to ignore CTS.  Forced on if RTS is handshake.
  932.                Bit 4,    DSR is handshake.  Not supported by SIO.
  933.                Bit 5,    DCD required to transmit.  Not supported by SIO.
  934.                Bit 6,    DSR required to receive.
  935.                Bit 7,    Must be zero.
  936.  
  937.           ─────────────────────────────────────
  938.  
  939.                "Flags2" is a bit flag.  The bits in the flag specify the
  940.                following:
  941.  
  942.                Bit 0,    SIO is to honor Xon/XOff received from remote.
  943.                Bit 1,    SIO may send Xon/Xoff to the remote.
  944.                Bit 2,    Enable error replacement character.  Not supported
  945.                          by SIO.
  946.  
  947.                Bit 3,    Enable null stripping.  Not supported by SIO.
  948.                Bit 4,    Enable break replacement character.  Not supported
  949.                          by SIO.
  950.  
  951.                Bit 5,    Enable Full duplex.  Half duplex is not supported
  952.                          by SIO.
  953.  
  954.                Bits 7 and 6        RTS Control Mode
  955.                          00 - Disable changing RTS during Open and Close.
  956.                          01 - Enable Changing RTS during Open and Close.
  957.                          10 - RTS used for input handshaking.
  958.                          11 - Toggle on transmit (half duplex).  Not
  959.                               supported by SIO.
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.           16
  968.  
  969.                "Flags3" is a bit flag.  The bits in the flag specify the
  970.                following:
  971.  
  972.                Bit 0,    Enable infinite write timeout processing.  When
  973.                          set, a write timeout will not occur.
  974.  
  975.                Bits 2 and 1        Read timeout processing
  976.                          00 - Invalid.
  977.                          01 - Normal read time out.
  978.                          10 - Wait for something.  Reads will return before
  979.                               a timeout occurs if something received.
  980.                          11 - No Wait.  Reads will return immediately with
  981.                               any available data.
  982.  
  983.                Bits 4 and 3        FIFO Control
  984.                          00 - No change in FIFO state.
  985.                          01 - Disable FIFO buffers.
  986.                          10 - Enable FIFO buffers.
  987.                          11 - Dynamic enabling and disabling of FIFOS.
  988.  
  989.                     **Note, SIO forces bits 4 and 3 to "10".
  990.  
  991.                Bits 6 and 5        Set receive trigger level
  992.                          00 - 1 character.
  993.                          01 - 4 characters.
  994.                          10 - 8 characters.
  995.                          11 - 14 characters.
  996.  
  997.                     **Note, SIO forces bits 6 and 5 to "10".
  998.  
  999.                Bit 7               Transmit load count
  1000.                          0 -  Load 1 character.
  1001.                          1 -  Load 16 characters.
  1002.  
  1003.                     **Note, SIO forces bit 7 to "1".
  1004.  
  1005.                "Error Replacement Byte" Not supported by SIO.
  1006.  
  1007.                "Break Replacement Byte" Not supported by SIO
  1008.  
  1009.                "Xon Character" Any value, default is 11h.
  1010.  
  1011.                "Xoff Character" Any value, default is 13h.
  1012.  
  1013.           Data Packet - None
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                                                                          17
  1022.  
  1023.  
  1024.                          54h - Write Extended Mode Parameters
  1025.  
  1026.           Parameter Packet
  1027.  
  1028.                ┌──────────────────────────────────────┐
  1029.                │         Item                Type     │
  1030.                ├───────────────────────────┬──────────┤
  1031.                │ Enhanced Flags1           │ BYTE     │
  1032.                ├───────────────────────────┼──────────┤
  1033.                │ Reserved                  │ DWORD    │
  1034.                └───────────────────────────┴──────────┘
  1035.  
  1036.                This function is not supported (ignored) by SIO.  However
  1037.                the bits are defined here for completeness.
  1038.  
  1039.                Enhanced Flags1
  1040.                Bit 0 -   Enhanced mode hardware available (Query only 74h).
  1041.                Bit 1 -   Enable enhanced mode.
  1042.                Bits 3 and 2        DMA Receive Operation
  1043.                     00 - Disable DMA receive capability.
  1044.                     01 - Enable DMA receive capability.
  1045.                     10 - Dedicate a DMA channel to receive.
  1046.                     11 - Reserved.
  1047.  
  1048.                Bits 5 and 4        DMA Transmit Operation
  1049.                     00 - Disable DMA transmit capability.
  1050.                     01 - Enable DMA transmit capability
  1051.                     10 - Dedicate a DMA channel to transmit.
  1052.                     11 - Reserved.
  1053.  
  1054.                Bit 6 -   Receive in DMA mode (Query only, 74h).
  1055.                Bit 7 -   Transmit in DMA mode (Query only, 74h).
  1056.  
  1057.           Data Packet - None.
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.           18
  1066.  
  1067.  
  1068.                              61h - Query Current Bit Rate
  1069.  
  1070.           Parameter Packet - None.
  1071.  
  1072.           Data Packet
  1073.  
  1074.                ┌──────────────────────────────────────┐
  1075.                │         Item                Type     │
  1076.                ├───────────────────────────┬──────────┤
  1077.                │ Bit/Baud Rate             │ WORD     │
  1078.                └───────────────────────────┴──────────┘
  1079.  
  1080.                See function 41h for more information.
  1081.  
  1082.  
  1083.                            62h - Query Line Characteristics
  1084.  
  1085.           Parameter Packet - None.
  1086.  
  1087.  
  1088.           Data Packet
  1089.  
  1090.  
  1091.                ┌──────────────────────────────────────┐
  1092.                │         Item                Type     │
  1093.                ├───────────────────────────┬──────────┤
  1094.                │ Data Bits Per Character   │ BYTE     │
  1095.                ├───────────────────────────┼──────────┤
  1096.                │ Parity Setting            │ BYTE     │
  1097.                ├───────────────────────────┼──────────┤
  1098.                │ Stop Bit Setting          │ BYTE     │
  1099.                ├───────────────────────────┼──────────┤
  1100.                │ Transmitting Break        │ BYTE     │
  1101.                └───────────────────────────┴──────────┘
  1102.  
  1103.                See function 42h for a definition of Data, Parity and Stop
  1104.                Bits.
  1105.  
  1106.                "Transmitting Break" is set to 1 if a break is being
  1107.                transmitted.  Otherwise, it is set to zero.
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.                                                                          19
  1116.  
  1117.  
  1118.                             63h - Query Extended Bit Rate
  1119.  
  1120.           Parameter Packet - None
  1121.  
  1122.  
  1123.           Data Packet
  1124.  
  1125.                ┌──────────────────────────────────────┐
  1126.                │         Item                Type     │
  1127.                ├───────────────────────────┬──────────┤
  1128.                │ Current Bit/Baud Rate     │ DWORD    │
  1129.                ├───────────────────────────┼──────────┤
  1130.                │ Fraction of Current       │ BYTE     │
  1131.                ├───────────────────────────┼──────────┤
  1132.                │ Minimum Bit/Baud Rate     │ DWORD    │
  1133.                ├───────────────────────────┼──────────┤
  1134.                │ Fraction of Minimum       │ BYTE     │
  1135.                ├───────────────────────────┼──────────┤
  1136.                │ Maximum Bit/Baud Rate     │ DWORD    │
  1137.                ├───────────────────────────┼──────────┤
  1138.                │ Fraction of Maximum       │ BYTE     │
  1139.                └───────────────────────────┴──────────┘
  1140.  
  1141.                "Current Bit/Baud Rate" is a 32 bit integer defining the
  1142.                current bit rate.
  1143.  
  1144.                "Fraction of Current" is always 0 when returned by SIO.
  1145.  
  1146.                "Minimum Bit/Baud Rate" is the minimum value that can be
  1147.                passed to SIO as a bit/baud rate.
  1148.  
  1149.                "Fraction of Minimum" is always 0 when returned by SIO. 
  1150.  
  1151.                "Maximum Bit/Baud Rate" is the maximum value that can be
  1152.                passed to SIO as a bit/baud rate.
  1153.  
  1154.                "Fraction of Maximum" is always 0 when returned by SIO.
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.           20
  1163.  
  1164.  
  1165.                                 64h - Query SIO Status
  1166.  
  1167.           Parameter Packet - None
  1168.  
  1169.           Data Packet
  1170.  
  1171.                ┌──────────────────────────────────────┐
  1172.                │         Item                Type     │
  1173.                ├───────────────────────────┬──────────┤
  1174.                │ SIO Status Byte           │ BYTE     │
  1175.                └───────────────────────────┴──────────┘
  1176.  
  1177.                "SIO Status Byte" is a bit flag.  The bits have the
  1178.                following meanings:
  1179.  
  1180.                Bit 0 -   Set if SIO is waiting for CTS before transmitting.
  1181.                Bit 1 -   Set if SIO is waiting for DSR before transmitting.
  1182.                Bit 2 -   Set if SIO is waiting for DCD before transmitting.
  1183.                Bit 3 -   Set if SIO is waiting because Xoff received or
  1184.                          transmitter is disabled (see function 47h).
  1185.  
  1186.                Bit 4 -   Reserved, not used by SIO.
  1187.                Bit 5 -   Set if SIO is waiting because break is being sent.
  1188.                Bit 6 -   Set if a transmit immediate is pending.
  1189.                Bit 7 -   Reserved, not used by SIO.
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.                                                                          21
  1198.  
  1199.  
  1200.                            65h - Query Transmit Data Status
  1201.  
  1202.           Parameter Packet - None.
  1203.  
  1204.           Data Packet
  1205.  
  1206.                ┌──────────────────────────────────────┐
  1207.                │         Item                Type     │
  1208.                ├───────────────────────────┬──────────┤
  1209.                │ Transmit Status           │ BYTE     │
  1210.                └───────────────────────────┴──────────┘
  1211.  
  1212.                "SIO Status Byte" is a bit flag.  The bits have the
  1213.                following meanings:
  1214.  
  1215.                Bit 0 -   Set if write in progress or pending.
  1216.                Bit 1 -   Set if any data is in the transmit buffer.
  1217.                Bit 2 -   Set if UART is currently transmitting.
  1218.                Bit 3 -   Set if a transmit immediate is pending.
  1219.                Bit 4 -   Set if an Xon needs to be sent.
  1220.                Bit 5 -   Set if an Xoff needs to be sent.
  1221.                Bit 6 -   Reserved
  1222.                Bit 7 -   Reserved
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.           22
  1231.  
  1232.  
  1233.                    66h - Query Current Modem Output Control Signals
  1234.  
  1235.  
  1236.           Parameter Packet - None.
  1237.  
  1238.           Data Packet
  1239.  
  1240.                ┌──────────────────────────────────────┐
  1241.                │         Item                Type     │
  1242.                ├───────────────────────────┬──────────┤
  1243.                │ Modem Output Signals      │ BYTE     │
  1244.                └───────────────────────────┴──────────┘
  1245.  
  1246.                "Modem Output Signals" is a bit flag.  The bits have the
  1247.                following meanings:
  1248.  
  1249.                Bit 0 -   Set if DTR is currently on.
  1250.                Bit 1 -   Set if RTS is currently on.
  1251.                Bits 2-7  Reserved, set to zero by SIO.
  1252.  
  1253.  
  1254.                        67h - Query Current Modem Input Signals
  1255.  
  1256.           Parameter Packet - None.
  1257.  
  1258.           Data Packet
  1259.  
  1260.                ┌──────────────────────────────────────┐
  1261.                │         Item                Type     │
  1262.                ├───────────────────────────┬──────────┤
  1263.                │ Modem Input Signals       │ BYTE     │
  1264.                └───────────────────────────┴──────────┘
  1265.  
  1266.                "Modem Output Signals" is a bit flag.  The bits have the
  1267.                following meanings:
  1268.  
  1269.                Bits 0-3  Reserved, set to zero by SIO.
  1270.                Bit 4 -   Clear To Send (CTS) is active.
  1271.                Bit 5 -   Data Set Ready (DSR) is active.
  1272.                Bit 6 -   Ring Indicator (RI), trailing edge detected.
  1273.                Bit 7 -   Data Carrier Detect (DCD) is active.
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.                                                                          23
  1282.  
  1283.  
  1284.                   68h - Query Number of Characters in Receive Buffer
  1285.  
  1286.           Parameter Packet - None.
  1287.  
  1288.           Data Packet
  1289.  
  1290.                ┌──────────────────────────────────────┐
  1291.                │         Item                Type     │
  1292.                ├───────────────────────────┬──────────┤
  1293.                │ Number of Bytes Buffered  │ WORD     │
  1294.                ├───────────────────────────┼──────────┤
  1295.                │ Byte Size of the Buffer   │ WORD     │
  1296.                └───────────────────────────┴──────────┘
  1297.  
  1298.                Self explaining.
  1299.  
  1300.  
  1301.                  69h - Query Number of Characters in Transmit Buffer
  1302.  
  1303.           Parameter Packet - None.
  1304.  
  1305.           Data Packet
  1306.  
  1307.                ┌──────────────────────────────────────┐
  1308.                │         Item                Type     │
  1309.                ├───────────────────────────┬──────────┤
  1310.                │ Number of Bytes Buffered  │ WORD     │
  1311.                ├───────────────────────────┼──────────┤
  1312.                │ Byte Size of the Buffer   │ WORD     │
  1313.                └───────────────────────────┴──────────┘
  1314.  
  1315.                Self explaining.
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.           24
  1324.  
  1325.  
  1326.                                 6Dh - Query SIO Error
  1327.  
  1328.  
  1329.           Parameter Packet - None.
  1330.  
  1331.           Data Packet
  1332.  
  1333.                ┌──────────────────────────────────────┐
  1334.                │         Item                Type     │
  1335.                ├───────────────────────────┬──────────┤
  1336.                │ SIO Error Word            │ WORD     │
  1337.                └───────────────────────────┴──────────┘
  1338.  
  1339.                "SIO Error Word" is a bit flag.  The bits have the following
  1340.                meaning:
  1341.  
  1342.                Bit 0 -   Set if a buffer overrun has occurred.
  1343.                Bit 1 -   Set if an overrun occurred at the UART.
  1344.                Bit 2 -   Set if the UART detected a parity error.
  1345.                Bit 3 -   Set if the UART detected a framing error.
  1346.                Bits 4-15 Reserved, set to zero by SIO.
  1347.  
  1348.                All bits of the SIO Error Word are reset prior to returning
  1349.                to the caller.
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.                                                                          25
  1358.  
  1359.  
  1360.                           72h - Query SIO Event Information
  1361.  
  1362.           Parameter Packet - None.
  1363.  
  1364.           Data Packet
  1365.  
  1366.                ┌──────────────────────────────────────┐
  1367.                │         Item                Type     │
  1368.                ├───────────────────────────┬──────────┤
  1369.                │ SIO Event Word            │ WORD     │
  1370.                └───────────────────────────┴──────────┘
  1371.  
  1372.                "SIO Event Word" is a bit flag.  The bits have the following
  1373.                meaning:
  1374.  
  1375.                Bit 0 -   Set when a receive character is transferred from
  1376.                          the UART to the receive buffer.
  1377.                Bit 1 -   Set when a receive (Read) timeout occurs.
  1378.                Bit 2 -   Set if the transmit buffer is empty.
  1379.                Bit 3 -   Set if Clear To Send (CTS) has changed state.
  1380.                Bit 4 -   Set if Data Set Ready (DSR) has changed state.
  1381.                Bit 5 -   Set if Data Carrier Detect (DCD) has changed
  1382.                          state.
  1383.                Bit 6 -   Set if a break has been detected.
  1384.                Bit 7 -   Set if a framing, parity, or overrun error has
  1385.                          occurred.
  1386.                Bit 8 -   Set if trailing edge of Ring Indicator (RI) has
  1387.                          occurred.
  1388.                Bits 9-15 Reserved, set to zero by SIO.
  1389.  
  1390.                All bits are reset prior to returning to the caller.
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.           26
  1399.  
  1400.  
  1401.                         73h - Read Device Control Block (DCB)
  1402.  
  1403.           Parameter Packet - None.
  1404.  
  1405.  
  1406.           Data Packet
  1407.  
  1408.                ┌──────────────────────────────────────┐
  1409.                │         Item                Type     │
  1410.                ├───────────────────────────┬──────────┤
  1411.                │ Write Timeout             │ WORD     │
  1412.                ├───────────────────────────┼──────────┤
  1413.                │ Read Timeout              │ WORD     │
  1414.                ├───────────────────────────┼──────────┤
  1415.                │ Flags1                    │ BYTE     │
  1416.                ├───────────────────────────┼──────────┤
  1417.                │ Flags2                    │ BYTE     │
  1418.                ├───────────────────────────┼──────────┤
  1419.                │ Flags3                    │ BYTE     │
  1420.                ├───────────────────────────┼──────────┤
  1421.                │ Error Replacement Byte    │ BYTE     │
  1422.                ├───────────────────────────┼──────────┤
  1423.                │ Break Replacement Byte    │ BYTE     │
  1424.                ├───────────────────────────┼──────────┤
  1425.                │ Xon Character             │ BYTE     │
  1426.                ├───────────────────────────┼──────────┤
  1427.                │ Xoff Character            │ BYTE     │
  1428.                └───────────────────────────┴──────────┘
  1429.  
  1430.                See function 53h for a description of the parameters.
  1431.  
  1432.  
  1433.                          74h - Read Enhanced Mode Parameters
  1434.  
  1435.           Parameter Packet - None.
  1436.  
  1437.           Data Packet
  1438.  
  1439.                ┌──────────────────────────────────────┐
  1440.                │         Item                Type     │
  1441.                ├───────────────────────────┬──────────┤
  1442.                │ Enhanced Flags1           │ BYTE     │
  1443.                ├───────────────────────────┼──────────┤
  1444.                │ Reserved                  │ DWORD    │
  1445.                └───────────────────────────┴──────────┘
  1446.  
  1447.                See function 54h for a description of the Flags1 Byte.
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.                                                                          27
  1456.  
  1457.                       Differences between SIO/VSIO and COM/VCOM
  1458.           What follows is some of the differences between SIO/VSIO and
  1459.           COM/VCOM that are know to the author.
  1460.  
  1461.           1 -  COM.SYS will automatically seek out and support four
  1462.                comm ports, COM1 through COM4.  SIO.SYS will
  1463.                automatically seek out and support only COM1 and COM2. 
  1464.                If SIO.SYS is to support more than two comm ports, they
  1465.                must be defined in the command line that loads SIO.SYS. 
  1466.                For example, DEVICE=SIO.SYS (COM3) (COM4) will cause
  1467.                SIO.SYS to support four comm ports.
  1468.  
  1469.           2 -  In the absence of overrides in the command line,
  1470.                COM.SYS will seek out four comm ports in the sequence
  1471.                of I/O ports 3F8h, 2F8h, 3E8h and 2E8h.  The first port
  1472.                found in this sequence is given the logical name COM1,
  1473.                the second is COM2 etc.  This means that the comm port
  1474.                at 2F8h could become COM1.  In the opinion of the
  1475.                author, this confuses some users to frustration.
  1476.  
  1477.                With no command line overrides, SIO.SYS uses a fixed
  1478.                I/O port concept.  That is, COM1 is always at I/O port
  1479.                3F8h, COM2 is always at 2F8h, etc.  Another way of
  1480.                looking at this is;  if no comm port exists at port
  1481.                3F8h, then you do not have a COM1.  SIO.SYS will not
  1482.                move another (found) comm port into the logical COM1
  1483.                slot.
  1484.  
  1485.           3 -  VSIO opens a comm port for a DOS session with sharing
  1486.                allowed.  VCOM uses an "exclusive use" open for DOS
  1487.                sessions.
  1488.  
  1489.           4 -  SIO.SYS will accept any number between 50 and 115200 as a
  1490.                valid baud rate.  For example, if an application program
  1491.                attempts to set a baud rate of 9990 bps, COM.SYS will reject
  1492.                it and SIO.SYS will accept it.
  1493.  
  1494.           5 -  The last decimal digit of a baud rate given to SIO must be
  1495.                zero.  SIO.SYS will not support baud rates like 75 or 134. 
  1496.                If given, they will be rounded to 80 and 130 respectively.
  1497.  
  1498.           6 -  SIO/VSIO execute faster than COM/VCOM.  This means that some
  1499.                applications, that are timing dependant, may not work under
  1500.                SIO/VSIO that do work under COM/VCOM.
  1501.  
  1502.           7 -  VSIO optionally (and by default) simulates a 16550A for DOS
  1503.                sessions.  VCOM simulates a 8250/16450.
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.           28
  1512.  
  1513.                     Appendix A, Hardware Port and IRQ Assignments
  1514.  
  1515.           I have obtained the following information from various sources. 
  1516.           Accuracy is not guaranteed.  In fact, nothing in this document is
  1517.           guaranteed.
  1518.  
  1519.           Addresses and IRQs for COM1 and COM2
  1520.  
  1521.                COM1 uses 03F8h and IRQ4
  1522.                COM2 uses 02F8h and IRQ3
  1523.  
  1524.           Defacto standard for COM3 and COM4 for PC, XT and AT
  1525.  
  1526.                COM3 uses 03E8h and IRQ4
  1527.                COM4 uses 02E8h and IRQ3
  1528.  
  1529.           Addresses and IRQ for COM3 through COM8 on the PS/2
  1530.  
  1531.                COM3 uses 3220h and IRQ3
  1532.                COM4 uses 3228h and IRQ3
  1533.                COM5 uses 4220h and IRQ3
  1534.                COM6 uses 4228h and IRQ3
  1535.                COM7 uses 5220h and IRQ3
  1536.                COM8 uses 5228h and IRQ3
  1537.  
  1538.           All PCs (know to the author) prior to the PS/2 and EISA only use
  1539.           10 bits to address hardware I/0 ports.  Systems prior to the PS/2
  1540.           and EISA can not address the standard PS/2 addresses for COM3
  1541.           through COM8.  If an AT or below attempts to address COM3 through
  1542.           COM8 using the PS/2 addresses, only the low 10 bits of the
  1543.           address are used.  That is, the high 6 bits of the address will
  1544.           be ignored by the hardware.  This means that any reference to
  1545.           COM3 through COM8 will actually address ports 220h through 22Fh
  1546.           on older PCs.
  1547.  
  1548.           One should avoid expansion boards that use ports 220h through
  1549.           22Fh unless the expansion board is a serial I/O board. 
  1550.  
  1551.           SIO will (attempt to) determine the hardware architecture
  1552.           (ISA/EISA and PS/2) that it is being executed on and use the
  1553.           appropriate hardware port addresses for COM1 thru COM4 as
  1554.           defaults.
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.                                                                          29
  1563.  
  1564.                                 Appendix B, SIO Chips
  1565.  
  1566.  
  1567.           The following is a collection of comments developed from hearsay,
  1568.           random documents, experience, and technical specifications. So,
  1569.           take it with a grain of salt.  Order information from the various
  1570.           manufactures if you want accurate information.
  1571.  
  1572.           Very good reference books are available from National
  1573.           Semiconductor Corporation.  They cover most of the SIO devices
  1574.           (also called UARTs) that you will find in many PCs and clones.  I
  1575.           am not sure that books can be ordered directly from National
  1576.           Semiconductor. They may require that you get it from a
  1577.           distributor.  In any case, the address on the back of the one
  1578.           manual is:
  1579.  
  1580.                National Semiconductor Corporation
  1581.                2900 Semiconductor Drive
  1582.                P.O. Box 58090
  1583.                Santa Clara, CA 95052-8090
  1584.  
  1585.                Tel:(408)721-5000
  1586.                TWX:(910)339-9240
  1587.  
  1588.           8250
  1589.  
  1590.           As best that I know, the 8250 was the first SIO chip (integrated
  1591.           circuit) that was used by the IBM PC and many clones.  In my
  1592.           opinion, it was a poor choice on the part of IBM.  I feel many
  1593.           superior devices, at comparable prices, were readily available. 
  1594.           At that time, I feel the 8251A or the 8530 would have been better
  1595.           choices.  But, they used the 8250 and therefore we must use it.
  1596.  
  1597.           From a hardware standpoint the 8250 is a relatively slow device. 
  1598.           It is advisable that programmers not perform successive inputs or
  1599.           outputs to this device.  It seems that software programs can load
  1600.           the various registers of the 8250 faster than it can process the
  1601.           information.  The 8250 had a total of 7 registers.  The
  1602.           specifications state that 56kb is the maximum baud rate.
  1603.  
  1604.           8250A
  1605.  
  1606.           I believe the 8250A is the 8250 with some bug fixes.  I have no
  1607.           idea what the bugs may have been.  A quick glance at the
  1608.           specifications shows the speed of the 8250 and 8250A to be much
  1609.           the same.  The 8250A added an 8th register.  This additional
  1610.           register enables software to detect if an 8250 is installed.  The
  1611.           specifications state that 56kb is the maximum baud rate.
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.           30
  1620.  
  1621.           16450
  1622.  
  1623.           The 16450 seems to be a speeded up version of the 8250A.  There
  1624.           is no direct way (that I know of) for software to detect the
  1625.           difference between an 8250A and a 16450.  I believe the 16450 was
  1626.           developed to eliminate the need for software to insert delays
  1627.           between successive accesses to the device.  The specifications
  1628.           indicate the 16450 is a much faster device than its predecessors. 
  1629.           The additional speed is only the speed at which the processor can
  1630.           access the device.  The maximum baud rate for the 16450 is still
  1631.           stated at 56kb.  However, I have been told by some people that
  1632.           they have run the 16450 successfully at much higher speeds. I do
  1633.           not believe there was ever a 16450A.
  1634.  
  1635.           16C451
  1636.  
  1637.           The 16C451 is a CMOS version of the 16450.  CMOS is a term for
  1638.           the material and manufacturing process used to make the part. 
  1639.           CMOS typically uses less power than other technologies.  If you
  1640.           are not designing hardware, you should view the 16C451 as a
  1641.           16450.
  1642.  
  1643.           16550 (Non A)
  1644.  
  1645.           It is hard to find a 16550 (Non A).  I was told by National
  1646.           Semiconductor that they did everything they could to get all
  1647.           16550s back.  SIO will detect a 16550 and tell you if you have
  1648.           one.  I am told that the 16550 was installed in early PS/2
  1649.           systems.
  1650.  
  1651.           The 16550 was the first shot at a FIFOed version of the 8250
  1652.           family from National semiconductor.  However, I was told by
  1653.           National Semiconductor that the FIFOs of the 16550 are not
  1654.           reliable and they should not be enabled.  SIO will treat a 16550
  1655.           like a 16450.  In this mode, they are reliable.  National
  1656.           Semiconductor would not provide me with a specification for the
  1657.           16550.  However, I suspect its maximum baud rate is the same as
  1658.           the 16550A which is 256kb.
  1659.  
  1660.           16550A, 16550AF and 16550AFN
  1661.  
  1662.           In the manuals that I have, National Semiconductor does not
  1663.           explain the differences between the 16550A and the 16550AF.  I
  1664.           suspect the AF part may have a few bug fixes.  I believe the N in
  1665.           AFN describes packaging, ceramic versus plastic, DIP versus
  1666.           surface mount etc.
  1667.  
  1668.           In the opinion of the author, there is no substitute for the
  1669.           16550A (and its successors) in the 8250 type series.  The 16550A
  1670.           is compatible with most software written for the entire family of
  1671.           8250 type devices.  Programs that are 16550A aware can provide
  1672.           much improved performance over previous devices.
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                                                                          31
  1681.  
  1682.  
  1683.           The maximum baud rate for the 16550A is specified at 256kb. 
  1684.           However, due to the hardware design of the PC et al, 115kb is the
  1685.           maximum baud rate that can be programmed by software.
  1686.  
  1687.           The 16550A can be plugged into the same socket that contains an
  1688.           8250, 8250A or 16450.  If your SIO expansion board has the SIO
  1689.           chips in sockets, you can upgrade to the 16550A by simply
  1690.           removing the old chips and replacing them with 16550As.
  1691.  
  1692.           The key to the performance increase of the 16550A is its FIFOs. 
  1693.           It has 16 byte FIFOs for both transmit and receive data.
  1694.  
  1695.           16550s Made by Western Digital
  1696.  
  1697.           I have been told, but I have not verified for myself, that 16550s
  1698.           made by Western Digital have a problem with their FIFOs when
  1699.           working at 2400 baud or below.
  1700.  
  1701.           16C551
  1702.  
  1703.           The 16C551 is a CMOS version of the 16550AF.  See the above
  1704.           description of the 16C451 for a discussion of CMOS.  Do not feel
  1705.           you need to upgrade from a 16550A or AF to a 16C551.  There is no
  1706.           gain from an existing users point of view.
  1707.  
  1708.           16C552
  1709.  
  1710.           The 16C552 is two 16C551s on a single chip.
  1711.  
  1712.           16C554
  1713.  
  1714.           The 16C554 is four 16C551s on a single chip.
  1715.  
  1716.           82510
  1717.  
  1718.           I believe Intel is the only company that manufactures the 82510. 
  1719.           The 82510 is feature rich with several modes of operation.  Its
  1720.           default mode is to operate as a 16450.  The 82510 has a 4 byte
  1721.           FIFO for both transmit and receive data.  A 4 byte FIFO is
  1722.           sufficient to provide significant performance over a basic 16450.
  1723.  
  1724.           The 82510 is small in size.  Therefore, it is found in many lap
  1725.           tops.
  1726.  
  1727.           The 82510 is somewhat of a sleeper.  I believe it would be much
  1728.           more widely used if Intel had promoted it more.  However, given a
  1729.           choice between the 82510 and the 16550A, I would select the
  1730.           16550A.
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.           32
  1739.  
  1740.                        Appendix C, Multi-Port Serial I/0 Cards
  1741.  
  1742.           I have received many requests for information about multi-port
  1743.           serial I/O card.  I will describe the boards that I know about
  1744.           (or have heard about) here.  I will add to the list as I receive
  1745.           precise information from users or develop it myself.
  1746.  
  1747.  
  1748.           STB 4COM  (ISA buss)
  1749.  
  1750.           I am very impressed with the STB 4COM card, they have almost got
  1751.           it.  Yes, its the same company that makes the VGA cards.  The
  1752.           4COM card uses a 16554 which is the equivalent of four 16550A. 
  1753.           Comm ports can use IRQs 2/9, 3, 4, 5, 10, 11, 12, and 15.  Any or
  1754.           all ports can share IRQs, and they have done this right.  I
  1755.           tested SIO with all four ports of the 4COM on IRQ12 and they
  1756.           worked correctly.  The user can select any of the following I/O
  1757.           port address for a comm port: 3F8, 2F8, 3E8, 2E8, 1A8, 1E8, 1F8,
  1758.           2A8.
  1759.  
  1760.           I purchased my 4COM card (for $119) from Steve Winter.  Steve can
  1761.           be reached at 800-735-5266 or 919-286-1502.
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.                                                                          33
  1770.  
  1771.                            Appendix D, Advanced SIO Options
  1772.  
  1773.  
  1774.           The following is provided for the experienced user. 
  1775.           Inexperienced users get themselves into a lot of trouble when
  1776.           trying to use these options and they cause an inordinate number
  1777.           of support problems. Therefore, the following are unsupported
  1778.           options.  If you use them, you must work out the problems
  1779.           yourself or ask a friend how they got it working.
  1780.  
  1781.           Protection
  1782.  
  1783.           Placing a dash "-" in the fourth parameter position, eg
  1784.           (COM1,3F8,IRQ4,-),  causes SIO not to provide any protection for
  1785.           that port.  The OS may still protect the port somewhat.  When the
  1786.           dash parameter is used the port is wide open (like DOS) for any
  1787.           process to access it.
  1788.  
  1789.           Locked Baud Rate
  1790.  
  1791.           Placing a colon and a baud rate following the communications
  1792.           port, eg (COM1:38400,3F8,IRQ4), causes the port to be locked at
  1793.           that baud rate.  No program, OS2 or DOS, is allowed to change the
  1794.           baud rate.
  1795.  
  1796.           IRQ Reflection to DOS Process
  1797.  
  1798.           Normally the IRQ that is reflected to a DOS process is the same
  1799.           as the actual hardware IRQ.  Placing a colon and an additional
  1800.           IRQ following the normal IRQ, eg (COM1,3F8,IRQ12:IRQ4), causes
  1801.           SIO/VSIO to reflect the IRQ to a DOS process on IRQ4 (in this
  1802.           example) even though the real hardware IRQ is IRQ12.  If one
  1803.           wishes SIO to automatically locate the hardware IRQ, then the
  1804.           following construct can be used: (COM1,3F8,:IRQ4).  Notice that
  1805.           the hardware IRQ is simply NOT specified.
  1806.  
  1807.           I/O Port Mapping to DOS Process
  1808.  
  1809.           Some DOS programs, such as CompuServe's CIM, insist that COM1 be
  1810.           at I/O port 03F8, COM2 at 02F8, etc.  On OS/2 systems, comm ports
  1811.           can have any I/O port address as specified by a command line.  If
  1812.           COM1 is not at I/O port 03F8 for some DOS programs, then COM1 can
  1813.           not be used by the DOS program.  The SIO command line allows the
  1814.           I/O ports to be mapped to a different address for DOS sessions,
  1815.           eg (COM1,FF80:03F8,IRQ12:IRQ4).  In this example, the real COM1
  1816.           is at FF80 on IRQ12, but is reflected to DOS processes on I/O
  1817.           ports 03F8 at IRQ4.  It is NOT necessary to map both the I/O port
  1818.           address and the IRQ.  When the I/O port is mapped to a DOS
  1819.           session, the UART will appear at BOTH I/O port addresses (FF80
  1820.           and 03F8 in the given example).
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.           34
  1829.  
  1830.                                         Index
  1831.  
  1832.           16450 . . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1833.           16550 Non A . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1834.           16550A  . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1835.           16550AF . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1836.           16550AFN  . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1837.           16550s Made by Western Digital  . . . . . . . . . . . . . . .  31
  1838.           16C451  . . . . . . . . . . . . . . . . . . . . . . . . . . .  30
  1839.           16C551  . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
  1840.           16C552  . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
  1841.           16C554  . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
  1842.           8250  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  29
  1843.           8250A . . . . . . . . . . . . . . . . . . . . . . . . . . . .  29
  1844.           82510 . . . . . . . . . . . . . . . . . . . . . . . . . . . .  31
  1845.           Additional Open . . . . . . . . . . . . . . . . . . . . . . . . 5
  1846.           Addresses and IRQ for COM3 through COM8 on the PS/2 . . . . .  28
  1847.           Addresses and IRQs for COM1 and COM2  . . . . . . . . . . . .  28
  1848.           Appendix A, Hardware Notes  . . . . . . . . . . . . . . . . .  28
  1849.           Appendix B, SIO Chips . . . . . . . . . . . . . . . . . . . .  29
  1850.           Appendix C, Multi-Port Serial I/0 Cards . . . . . . . . . . .  32
  1851.           Appendix D, Advanced SIO Options  . . . . . . . . . . . . . .  33
  1852.           BBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1853.           Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  1854.           CompuServe  . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1855.           DCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
  1856.           Defacto standard for COM3 and COM4  . . . . . . . . . . . . .  28
  1857.           Device Control Block  . . . . . . . . . . . . . . . . . . . . . 5
  1858.           Differences between SIO/VSIO and COM/VCOM . . . . . . . . . .  27
  1859.           Distribution  . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1860.           Driver Initialization . . . . . . . . . . . . . . . . . . . . . 3
  1861.           DTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  1862.           DTR Control Mode  . . . . . . . . . . . . . . . . . . . . .  5, 6
  1863.           Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1864.           Extended Set Bit Rate . . . . . . . . . . . . . . . . . . . .  10
  1865.           FAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1866.           FIFO  . . . . . . . . . . . . . . . . . . . . . . . . . .  30, 31
  1867.           File System Requests  . . . . . . . . . . . . . . . . . . . . . 3
  1868.           First Level Open  . . . . . . . . . . . . . . . . . . . . . . . 4
  1869.           Hold Transmit . . . . . . . . . . . . . . . . . . . . . . . .  13
  1870.           I/O Port Mapping to DOS Process . . . . . . . . . . . . . . .  33
  1871.           Initial Open  . . . . . . . . . . . . . . . . . . . . . . . . . 5
  1872.           Input Flush . . . . . . . . . . . . . . . . . . . . . . . . . . 4
  1873.           Input Status  . . . . . . . . . . . . . . . . . . . . . . . . . 3
  1874.           Intermediate Close  . . . . . . . . . . . . . . . . . . . . . . 6
  1875.           IRQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
  1876.           IRQ Reflection to DOS Process . . . . . . . . . . . . . . . .  33
  1877.           Last Close  . . . . . . . . . . . . . . . . . . . . . . . . . . 6
  1878.           Locked Baud Rate  . . . . . . . . . . . . . . . . . . . . . .  33
  1879.           National Semiconductor Corporation  . . . . . . . . . . . . .  29
  1880.           Open  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
  1881.           Ordering  . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.                                                                          35
  1890.  
  1891.           OS2AVEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1892.           Output Flush  . . . . . . . . . . . . . . . . . . . . . . . . . 4
  1893.           Output Status . . . . . . . . . . . . . . . . . . . . . . . . . 4
  1894.           Protection  . . . . . . . . . . . . . . . . . . . . . . . . .  33
  1895.           Query Current Bit Rate  . . . . . . . . . . . . . . . . . . .  18
  1896.           Query Current Modem Input Signals . . . . . . . . . . . . . .  22
  1897.           Query Current Modem Output Control Signals  . . . . . . . . .  22
  1898.           Query Extended Bit Rate . . . . . . . . . . . . . . . . . . .  19
  1899.           Query Line Characteristics  . . . . . . . . . . . . . . . . .  18
  1900.           Query Number of Characters in Receive Buffer  . . . . . . . .  23
  1901.           Query Number of Characters in Transmit Buffer . . . . . . . .  23
  1902.           Query SIO Error . . . . . . . . . . . . . . . . . . . . . . .  24
  1903.           Query SIO Event Information . . . . . . . . . . . . . . . . .  25
  1904.           Query SIO Status  . . . . . . . . . . . . . . . . . . . . . .  20
  1905.           Query Transmit Data Status  . . . . . . . . . . . . . . . . .  21
  1906.           Read  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
  1907.           Read Device Control Block (DCB) . . . . . . . . . . . . . . .  26
  1908.           Read Enhanced Mode Parameters . . . . . . . . . . . . . . . .  26
  1909.           RTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  1910.           RTS Control Mode  . . . . . . . . . . . . . . . . . . . . .  5, 6
  1911.           Set Bit Rate  . . . . . . . . . . . . . . . . . . . . . . . . . 8
  1912.           Set Break Off . . . . . . . . . . . . . . . . . . . . . . . .  11
  1913.           Set Break on  . . . . . . . . . . . . . . . . . . . . . . . .  14
  1914.           Set Line Characteristics  . . . . . . . . . . . . . . . . . . . 9
  1915.           Set Modem Control Signals . . . . . . . . . . . . . . . . . .  12
  1916.           SIO Chips . . . . . . . . . . . . . . . . . . . . . . . . . .  29
  1917.           Start Transmit  . . . . . . . . . . . . . . . . . . . . . . .  13
  1918.           STB 4COM  . . . . . . . . . . . . . . . . . . . . . . . . . .  32
  1919.           Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  1920.           Transmit Byte Immediate . . . . . . . . . . . . . . . . . . .  11
  1921.           UART  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  29
  1922.           WHAT IS SIO . . . . . . . . . . . . . . . . . . . . . . . . . . 1
  1923.           Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
  1924.           Write Device Control Block (DCB)  . . . . . . . . . . . . . .  14
  1925.           Write Extended Mode Parameters  . . . . . . . . . . . . . . .  17
  1926.